
<%@page import="br.com.clicarros.dominio.solicitacaoveiculo.SolicitacaoVeiculo"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>

        
    </head>
    <body>
        <jsp:include page="../../topo.jsp" flush="true"></jsp:include>
        ${mensagem}
        
    <form name="form1" action="ControleSolicitacaoVeiculo" method="post"> 
        <input type="submit" class="cancelar" name="excluir" value="Excluir" tabindex="2" /> 
         <a href="ControleSolicitacaoVeiculo?cadastrosolicitacaoveiculo">Nova Solicitação</a>
           
        <table padding="5px" width="100%" class="bordasimples">
          <tr align="center" bgcolor="#cccccc" >
                    <td widht="5%"></td>
                    <td widht="10%"> Nome </td>
                    <td widht="10%"> Telefone </td>
                    <td widht="14%"> E-mail</td>
                    <td widht="10%"> Valor Mínimo </td>
                    <td widht="10%"> Valor Máximo</td>                 
                    <td widht="10%"> Marca </td>
                    <td widht="10%"> Modelo </td>
                    <td widht="10%"></td>
         </tr>  
         
         <tr align="center" bgcolor="#cccccc" >
                    <td> </td>
                    <td> <input type="text" class="pequisaSV" name="nome"> </td>
                    <td> <input type="text" name="telefone"> </input> </td>
                    <td> <input type="text" class="pequisaSV" name="email"> </input> </td>
                    <td> <input type="text" class="pequisaSV" name="valorminimo"> </input> </td>
                    <td> <input type="text" class="pequisaSV" name="valormaximo"> </input> </td>
                    <td> <input type="text" class="pesquisaSV" name="marca"> </input> </td>
                    <td> <input type="text" class="pesquisaSV" name="modelo"> </input> </td>
                    <td> <input type="submit" name="filtrar" class="enviar" value="Pesquisar" tabindex="1"> </input></td>
                    
         </tr>
         
        <%
                    List solicitacoes = (List) request.getAttribute("solicitacoes");
                    for(Object sv : solicitacoes) {
                        SolicitacaoVeiculo s = (SolicitacaoVeiculo) sv;
                %>
                <tr align="center" bgcolor="#F5F5F5">
                    <td><input type="checkbox" class="checkbox" name="id" value="<%= s.getIdsolicitacaoveiculo() %>" /></td>
                    <td><%= s.getCliente().getNome() %></td>
                    <td><%= s.getCliente().getTelefone() %></td>
                    <td><%= s.getCliente().getEmail() %></td>
                    <td><%= s.getValorminimo() %></td>
                    <td><%= s.getValormaximo() %></td>
                    <td><%= s.getVeiculo().getMarca().getMarca() %></td>
                    <td><%= s.getVeiculo().getModelo() %></td>
                    <td><a href="ControleSolicitacaoVeiculo?editar=<%= s.getIdsolicitacaoveiculo() %>"><img src="imagens/editar.png" alt="editar" title="editar" /></a></td>
                </tr>
                <%
                    } // fim do for.
                %>
        </table> 
        </form>
    </body>
</html>